using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;

namespace EventBus
{
    /// <summary>
    /// 以异步的方式监听事件，没有返回值
    /// </summary>
    public partial class EventBusImpl
    {
        public void Listen(string eventName, Func<UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T>(string eventName, Func<T, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2>(string eventName, Func<T1, T2, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2, T3>(string eventName, Func<T1, T2, T3, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2, T3, T4>(string eventName, Func<T1, T2, T3, T4, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2, T3, T4, T5>(string eventName, Func<T1, T2, T3, T4, T5, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2, T3, T4, T5, T6>(string eventName, Func<T1, T2, T3, T4, T5, T6, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2, T3, T4, T5, T6, T7>(string eventName, Func<T1, T2, T3, T4, T5, T6, T7, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }

        public void Listen<T1, T2, T3, T4, T5, T6, T7, T8>(string eventName, Func<T1, T2, T3, T4, T5, T6, T7, T8, UniTask> callback)
        {
            ListenImpl(eventName, callback);
        }
    }
}